package com.zyh.question.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zyh.common.annotation.Excel;
import com.zyh.common.core.domain.BaseEntity;
import com.zyh.exam.domain.ExamPaper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 选项表对象 t_exam_question
 *
 * @author zyh
 * @date 2025-02-20
 */
@TableName(value = "t_exam_question")
public class ExamQuestion extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 试题表id
     */
    private Long id;

    /**
     * 试卷表id（关联试卷表外键）
     */
    @Excel(name = "试卷表id", readConverterExp = "关=联试卷表外键")
    private Long paperId;

    /**
     * 试卷实体类
     */
    @TableField(exist = false)
    private ExamPaper examPaper;

    /**
     * 题目类型（单选，多选，填空）
     */
    @Excel(name = "题目类型", readConverterExp = "单=选，多选，填空")
    private String questionType;

    /**
     * 题目内容
     */
    @Excel(name = "题目内容")
    private String content;

    /**
     * 选项配置
     */
    @Excel(name = "选项配置")
    private String options;

    /**
     * 题目排序
     */
    private Long sort;

    /**
     * 是否必答
     */
    @Excel(name = "是否必答")
    private Integer required;

    /**
     * 量表因子维度
     */
    @Excel(name = "量表因子维度")
    private String symptomCluster;

    private String delFlag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public ExamPaper getExamPaper() {
        return examPaper;
    }

    public void setExamPaper(ExamPaper examPaper) {
        this.examPaper = examPaper;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getOptions() {
        return options;
    }

    public void setOptions(String options) {
        this.options = options;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Integer getRequired() {
        return required;
    }

    public void setRequired(Integer required) {
        this.required = required;
    }

    public String getSymptomCluster() {
        return symptomCluster;
    }

    public void setSymptomCluster(String symptomCluster) {
        this.symptomCluster = symptomCluster;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("paperId", getPaperId())
                .append("examPaper", getExamPaper())
                .append("questionType", getQuestionType())
                .append("content", getContent())
                .append("options", getOptions())
                .append("sort", getSort())
                .append("required", getRequired())
                .append("SymptomCluster", getSymptomCluster())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
